﻿<!--
	RegExpress
	
	Copyright (c) 2010, Daniel McGaughran
	
	Licensed under the Apache Licence, Version 2.0 (the "Licence");
	you may not use this file except in compliance with the Licence.
	You may obtain a copy of the License at
	
		http://www.apache.org/licenses/LICENSE-2.0
	
	Unless required by applicable law or agreed to in writing, software
	distributed under the Licence is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the Licence for the specific language governing permissions and
	limitations under the Licence.
	
	-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:xrCt="clr-namespace:XrControls;assembly=XrControls">


	<ControlTemplate x:Key="DefaultListBoxItemTemplate" TargetType="{x:Type ListBoxItem}">
		<Border Name="frame" Background="{StaticResource ItemBgndBrush}" Margin="0,1" Padding="2" >
			<ContentPresenter />
		</Border>
		<ControlTemplate.Triggers>
			<Trigger Property="IsSelected" Value="true">
				<Setter TargetName="frame" Property="Background" Value="{StaticResource ItemSelBgndBrush}" />
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>


	<ControlTemplate x:Key="DefaultListBoxTemplate" TargetType="{x:Type ListBox}">
		<Border Style="{StaticResource ListPanel}">
			<ScrollViewer Name="ListScroller" Focusable="false" Padding="{TemplateBinding Padding}" 
					Template="{StaticResource ColumnWrapPanelScroller}">
				<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
			</ScrollViewer>
		</Border>
		<ControlTemplate.Triggers>
			<Trigger Property="IsEnabled" Value="false">
				<Setter Property="IsEnabled" TargetName="ListScroller" Value="false"/>
			</Trigger>
			<Trigger Property="IsGrouping" Value="true">
				<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>



	<ControlTemplate x:Key="DefaultTabControlTemplate" TargetType="{x:Type TabControl}">
		<DockPanel>
			<Border Style="{StaticResource TabPanelFrame}" DockPanel.Dock="Top" >
				<xrCt:UniformDoubleStack IsItemsHost="True" />
			</Border>
			<Border Style="{StaticResource TabbedContentFrame}">
				<ContentPresenter ContentSource="SelectedContent" />
			</Border>
		</DockPanel>
	</ControlTemplate>



	<ControlTemplate x:Key="DefaultTabItemTemplate" TargetType="{x:Type TabItem}">
		<Border x:Name="TabItemFrame" Style="{StaticResource TabItemFrame}">
			<ContentPresenter ContentSource="Header" VerticalAlignment="Center"	HorizontalAlignment="Center" />
		</Border>

		<ControlTemplate.Triggers>
			<Trigger Property="IsSelected" Value="True">
				<Setter TargetName="TabItemFrame" Property="BorderBrush" Value="{StaticResource SelectedTabFrameBrush}" />
				<Setter TargetName="TabItemFrame" Property="Background" Value="{StaticResource SelectedTabBgndBrush}" />
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>


</ResourceDictionary>